/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.univcasa.managing.impl;

import com.univcasa.db.model.CompteEtudiant;
import com.univcasa.db.model.Criteres;
import com.univcasa.managing.ComptesStudentsManager;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;


/**
 *
 * @author issam
 */
public class testComptesManager {
    
    public static void main(String[] args){
        
      //  testAddList();
      //  testGetAll();
        //testListApogeesStudents();
        //testGetStdByapogee("12064628");
        //testGetStdByCinCne();
        testGetStdWithNoCin();
    }
    public static void testGetStdWithNoCin(){        

    }

    public static void testGetStdByCinCne(){
        Criteres criteria = new Criteres();
        criteria.put("cin", "BH464706");
        criteria.put("cne", "1210412282");
        ComptesStudentsManager manager = new ComptesStudentsManagerImpl();
        CompteEtudiant std = manager.getCompteEtudiantByCriteria(criteria);
        System.out.println( std );    
    }

    public static void testGetStdByapogee(String apogee){
        ComptesStudentsManager manager = new ComptesStudentsManagerImpl();
        CompteEtudiant std = manager.getCompteEtudiantByApogee(apogee);
        System.out.println( std );
    }
    
    public static void testListApogeesStudents(){
        
    }

    public static void testAddList(){
        ComptesStudentsManager manager = new ComptesStudentsManagerImpl();
        List lista = new ArrayList();

        CompteEtudiant etudiant = new CompteEtudiant();
        etudiant.setApogee("122121");
        etudiant.setCin("BHHGGG");
        etudiant.setCne("12144444");
        etudiant.setEtab("FCC");
        etudiant.setNom("nompppp");
        etudiant.setPrenom("prenommmmm");
        etudiant.setEtape("filiera");
        etudiant.setNaissance(new Date("22-10-1984")) ;
        etudiant.setMailPerso("issam@univ");

        CompteEtudiant etudiant2 = new CompteEtudiant();
        etudiant2.setApogee("122121");
        etudiant2.setCin("BHHGGG");
        etudiant2.setCne("12144444");
        etudiant2.setEtab("FCC");
        etudiant2.setNom("nompppp");
        etudiant2.setPrenom("prenommmmm");
        etudiant2.setEtape("filiera");
        etudiant2.setNaissance(new Date("22-10-1984"));
        etudiant2.setMailPerso("issam@univ");

        lista.add( etudiant );
        lista.add(etudiant2);

        manager.ajouterComptesEtudiants(lista);
    }
    public static void testAddOne(){
        ComptesStudentsManager manager = new ComptesStudentsManagerImpl();
        
        CompteEtudiant etudiant = new CompteEtudiant();
        etudiant.setApogee("122121");
        etudiant.setCin("BHHGGG");
        etudiant.setCne("12144444");
        etudiant.setEtab("FCC");
        etudiant.setNom("nompppp");
        etudiant.setPrenom("prenommmmm");
        etudiant.setEtape("filiera");
        etudiant.setNaissance(new Date("22-10-1984"));
        etudiant.setMailPerso("issam@univ");

        manager.ajouterCompteEtudiant(etudiant);
    }
    public static void testGetAll(){
        
    }
}
